import java.util.*;
import java.net.*;
import java.nio.*;
import java.io.*;
import java.security.*;
import java.applet.*;
import java.util.*;
import java.lang.reflect.*;
import org.json.simple.*;
import org.json.simple.parser.*;



public class Test 
{

  public static void main(String arg[]) throws Exception
  {

  JSONParser parser=new JSONParser();

  System.out.println("=======decode=======");
                
  String s="[0,{\"1\":{\"2\":{\"3\":{\"4\":[5,{\"6\":7}]}}}}]";
  Object obj=parser.parse(s);
  JSONArray array=(JSONArray)obj;
  System.out.println("======the 2nd element of array======");
  System.out.println(array.get(1));
  System.out.println();


  }

}

